<template>
  <div class="Count">
    <p>我是Count</p>
    <p>{{ count }}</p>
    <p>{{ name }}{{ age }}{{ sex }}</p>
    <button @click="count++">累加</button>
    <button @click="vc">vc</button>
  </div>
</template>

<script>
export default {
  name: "MyCount",
  data() {
    return {
      count: 0,
    };
  },
  props: ["name", "age", "sex"],
  methods: {
    vc() {
      console.log(this, "this");
    },
  },
};
</script>

<style scoped>
/* scoped 的作用 只允许当前组件使用该style */
.Count {
  background-color: chocolate;
}
</style>
